package com.itheima.d3_oop;

/**
 * @author Dushaohua
 * @date 2024/4/15 15:21
 */
public class Test {
    public static void main(String[] args) {
        Student s1 = new Student();
        s1.name = "小明";
        s1.chinese = 89;
        s1.math = 90;

        Student s2 = new Student();
        s2.name = "小亮";
        s2.chinese = 79;
        s2.math = 89;

        Student s3 = new Student();
        s3.name = "小美";
        s3.chinese = 97;
        s3.math = 86;

        System.out.println(s1.name + ": " + (s1.chinese + s1.math ));
        System.out.println(s2.name + ": " + (s2.chinese + s2.math ));
        System.out.println(s3.name + ": " + (s3.chinese + s3.math ));
        System.out.println("------------------------");
        Teacher num1 = new Teacher();
        num1.subject = "语文";
        num1.age = 28;
        num1.time = 3;

        Teacher num2 = new Teacher();
        num2.subject ="数学";
        num2.age = 37;
        num2.time = 5;

        Teacher num3 = new Teacher();
        num3.subject = "英语";
        num3.age = 26;
        num3.time = 6;

        System.out.println("学科："+num1.subject + " 年龄：" + num1.age + " 教学时间: " + num1.time +"年");
        System.out.println("学科："+num2.subject + " 年龄：" + num2.age + " 教学时间: " + num2.time +"年");
        System.out.println("学科："+num3.subject + " 年龄：" + num3.age + " 教学时间: " + num3.time +"年");





















    }
}
